package com.ra.pay;

import java.math.BigDecimal;
import java.sql.Timestamp;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

import com.googlecode.cswish.annotation.cm;

/**
 * 支付记录
 * 
 * @author shen.kang Date: 2015-5-7
 *
 */
@Entity
public class PaymentRecord {
	
	@cm("支付宝")
	public static final int PAY_TYPE_ALIPAY = 3;
	
	@cm("微信支付")
	public static final int PAY_TYPE_WEIXIN = 0;
	
	@cm("网银支付")
	public static final int PAY_TYPE_BANK = 2;
	
	@cm("现金支付")
	public static final int PAY_TYPE_CASH = 1;
	
	@cm("支付成功")
	public static final int PAY_STATE_SUCCESS = 1;
	
	@cm("支付失败")
	public static final int PAY_STATE_FAILURE = 2;
	
	// PC网站支付服务
	public static final String ALIPAY_SERVICE_TYPE_PAY = "create_direct_pay_by_user";
	
	// 批量转账服务
	public static final String ALIPAY_SERVICE_TYPE_TRANS = "batch_trans_notify";
	
	// APP支付服务(Android and ios)
	public static final String ALIPAY_SERVICE_TYPE_APP = "mobile.securitypay.pay";
	
	// 手机网站支付服务
	public static final String ALIPAY_SERVICE_TYPE_WAP = "alipay.wap.auth.authAndExecute";
	
	// 获取Token授权令牌服务
	public static final String ALIPAY_SERVICE_TYPE_TOKEN = "alipay.wap.trade.create.direct";
	
	// 手机网站支付服务（2015-5-22更新） 
	public static final String ALIPAY_SERVICE_TYPE_WAP_NEW = "alipay.wap.auth.authAndExecute";

	// 支付记录ID
	private Integer Id;
	
	// 支付金额
	private BigDecimal totalFee;
	
	// 支付方式3、支付宝 0、微信支付2、网银支付1、现金交易
	private Integer payType;
	
	// 支付状态1、成功 2失败
	private Integer payState;
	
	// 订单类型1、预定订单 2、交租订单
	private Integer orderType;
	
	// 商户订单号
	private String outTradeNo;
	
	// 支付交易号
	private String tradeNo;
	
	// 支付记录创建时间
	private Timestamp createTime;

	public Timestamp getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

	@Id
	@GeneratedValue
	public Integer getId() {
		return Id;
	}

	public void setId(Integer id) {
		Id = id;
	}

	public BigDecimal getTotalFee() {
		return totalFee;
	}

	public void setTotalFee(BigDecimal totalFee) {
		this.totalFee = totalFee;
	}

	public Integer getPayType() {
		return payType;
	}

	public void setPayType(Integer payType) {
		this.payType = payType;
	}

	public Integer getPayState() {
		return payState;
	}

	public void setPayState(Integer payState) {
		this.payState = payState;
	}

	public String getTradeNo() {
		return tradeNo;
	}

	public void setTradeNo(String tradeNo) {
		this.tradeNo = tradeNo;
	}

	public Integer getOrderType() {
		return orderType;
	}

	public void setOrderType(Integer orderType) {
		this.orderType = orderType;
	}

	public String getOutTradeNo() {
		return outTradeNo;
	}

	public void setOutTradeNo(String outTradeNo) {
		this.outTradeNo = outTradeNo;
	}
	
}
